<?php session_start();
require_once '../common.php';
$tab_type = 'search';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>DOAF - Search</title>
        <link rel="stylesheet" type="text/css" href="<?php echo SITEURI; ?>/inc/style/do.css"/>
        <link rel="stylesheet" type="text/css" href="<?php echo SITEURI; ?>/inc/style/autocomplete.css"/>
    </head>
    <body>
        <div class="container">
            <div class="header">
                <div id="hdl">
                    <font size="6px">Disease Ontology Annotation Framework</font>
                </div>
                <?php require_once (ABSPATH . 'pages/header.php'); ?>
            </div>
            <div class="clear"></div>

            <div class="main">
                <form id="formd2g" action="<?php echo SITEURI;?>/pages/result.php" method="post">
                    <input type="hidden" name="st" value="d2g"/>
                    <div id="scbar_left">
                        <table class="sctable">
                            <tbody>
                                <tr>
                                    <td class="scbar_icon_td"></td>
                                    <td class="scbar_txt_td"><input class="xg1" name="qn" id="dn" autocomplete="on" type="text"></input></td>
                                    <td class="scbar_btn_td"><button type="submit" name="searchsubmit" id="scbar_btn_dg" class="pn pnc" value="true"><strong class="xi2 xs0">To Gene</strong></button></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </form>
                <form id="formg2d" action="<?php echo SITEURI;?>/pages/result.php" method="post">
                    <input type="hidden" name="st" value="g2d"/>
                    <div id="scbar_right">
                        <table class="sctable">
                            <tbody>
                                <tr>
                                    <td class="scbar_icon_td"></td>
                                    <td class="scbar_txt_td"><input class="xg1" name="qn" id="gn" autocomplete="on" type="text"></input></td>
                                    <td class="scbar_btn_td"><button type="submit" name="searchsubmit" id="scbar_btn_gd" class="pn pnc" value="true"><strong class="xi2 xs0">To Disease</strong></button></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </form>
                <div class="clear"></div>
                
            </div>
            <?php require_once (ABSPATH . 'pages/footer.php'); ?>
        </div>
        <script type="text/javascript" src="<?php echo SITEURI; ?>/inc/js/lib/jquery-1.7.1.js"></script>
        <script type="text/javascript" src="<?php echo SITEURI;?>/inc/js/lib/jquery.cookie.js"></script>
        <script type="text/javascript" src="<?php echo SITEURI;?>/inc/js/lib/jquery.hotkeys.js"></script>
        <script type="text/javascript" src="<?php echo SITEURI;?>/inc/js/lib/jquery.jstree.js"></script>
        <script type="text/javascript" src="<?php echo SITEURI; ?>/inc/js/lib/jquery.autocomplete.js"></script>
        <script type="text/javascript" src="<?php echo SITEURI; ?>/inc/js/inputvalue.js"></script>
        <script type="text/javascript" src="<?php echo SITEURI;?>/inc/js/doa.js"></script>
        <script type="text/javascript">
            $(function(){
                setActiveTab('<?php echo $tab_type;?>');
                $("#gn").inputLabel('<?php echo DEFAULT_GENE; ?>');
                $("#dn").inputLabel('<?php echo DEFAULT_DISEASE; ?>');
                $('#scbar_btn_dg').live('click', function(){
                });
                $('#scbar_btn_gd').live('click', function(){
                });
                $('#gn').autocomplete('<?php echo SITEURI . '/ajax/autocomplete.php?type=g' ?>', {
                    mustMatch: false,
                    matchContains: true,
                    multiple: true,
                    multipleSeparator: '<?php echo STRING_SEPARATOR;?>',
                    max: 20
                });
                
                $('#dn').autocomplete('<?php echo SITEURI . '/ajax/autocomplete.php?type=d' ?>', {
                    mustMatch: false,
                    matchContains: true,
                    multiple: true,
                    multipleSeparator: '<?php echo STRING_SEPARATOR;?>',
                    max: 20
                });
            });
        </script>
    </body>
</html>
